package com.smartstate.iot.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@ApiModel(description = "下发topic数据")
@EqualsAndHashCode
public class TopicUpVo {

    @ApiModelProperty(value = "13位时间戳")
    private String timesTamp;

    @ApiModelProperty(value = "盒子配置是否成功")
    private String config;

    @ApiModelProperty(value = "设备信息")
    private List<Content> content;

    @Data
    @ApiModel(value = "属性值参数", description = "属性值参数")
    public static class Content {
        @ApiModelProperty(value = "ip")
        private String ip;

        @ApiModelProperty(value = "端口号")
        private String port;

        @ApiModelProperty(value = "设备名称")
        private String deviceName;

        @ApiModelProperty(value = "盒子类型")
        private String deviceType;

        @ApiModelProperty(value = "盒子初始topic")
        private String newTopic;

        @ApiModelProperty(value = "盒子id")
        private String deviceId;

        @ApiModelProperty(value = "cpu")
        private String cpu;

        @ApiModelProperty(value = "内存")
        private String momery;

        @ApiModelProperty(value = "配置详情")
        private List<ConfigDetails> config;
    }

    @Data
    @ApiModel(value = "配置详情", description = "配置详情")
    public static class ConfigDetails {
        @ApiModelProperty(value = "dataId")
        private String dataId;

        @ApiModelProperty(value = "上限")
        private String upLimit;

        @ApiModelProperty(value = "下限")
        private String downLimit;

        @ApiModelProperty(value = "是否报警 0:不报警 1:报警")
        private String isAlarm;

        @ApiModelProperty(value = "偏差")
        private String deviation;
    }

}
